package com.diligreat.tag; 

import java.io.IOException;

import javax.servlet.jsp.JspException;
import javax.servlet.jsp.tagext.TagSupport;

import com.diligreat.util.CodeTransUtil;

/**  
 * @Author Bruce 
 * @Date 2012-2-18
 * @Comments
 */
public class CodeTranslateTag extends TagSupport {
	private static final long serialVersionUID = 7606634379312591595L;
	private String code;
	
	@Override
	public int doStartTag() throws JspException {
		//System.out.println("in CodeTranslateTag code="+code);
		try {
			pageContext.getOut().write(CodeTransUtil.getText(code));
		} catch (IOException e) {
			e.printStackTrace();
		}
		return super.doStartTag();
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}


	
}
 